// GrandiaX Mana Egg Table GeneratorView.cpp : implementation of the CGrandiaXSpecialsView class
//

#include "stdafx.h"
#include "GrandiaX Mana Egg Table Generator.h"

#include "GrandiaX Mana Egg Table Generator Doc.h"
#include "GrandiaX Combi View.h"
#include "MainFrm.h"

IMPLEMENT_DYNCREATE(CGrandiaXCombiView, CScrollView)

CGrandiaXCombiView::CGrandiaXCombiView()
{
}

const char* CGrandiaXCombiView::GetSectionName(int Section)
{
    return GetDocument()->GetCombiSectionName(Section);
}


int CGrandiaXCombiView::GetSections() const
{
    return 9;
}

void CGrandiaXCombiView::GetCommonInfo(SpecialCommonInfo* SCI, int Section, int Index)
{
     GetDocument()->GetCombiCommonInfo(SCI, Section, Index);
}

void CGrandiaXCombiView::SetCommonInfo(SpecialCommonInfo* SCI, int Section, int Index)
{
     GetDocument()->SetCombiCommonInfo(SCI, Section, Index);
}

const char* CGrandiaXCombiView::GetSectionName(int Section, int Index)
{
    return GetDocument()->GetCombiName(Section, Index);
}

void CGrandiaXCombiView::WriteToGame()
{
    GetDocument()->WriteToGame(GetDocument()->rwcCombis);
}

void CGrandiaXCombiView::UpdateFullSection(int SectSel)
{
    ((CMainFrame*)(AfxGetMainWnd()->GetTopLevelFrame()))->UpdateStatusText(
        GetDocument()->GetCombiSectionMembers(SectSel));
}